<script setup>
import { ref } from 'vue';
// 使用 ref 定义响应式数据
const itemText = ref('文本文本文本文本');

</script>
<template>
    <div class="hotvideo">
        <div class="hotvideo-heaer">
            <i class="i-arrow"></i>
            <h3>彪子有料</h3>
        </div>
        <div class="hotvideo-list" v-if="true">
            <ul>
                <li v-for="item in 6">
                    <router-link>最热</router-link>
                </li>
            </ul>
        </div>
        <div class="hot" v-else>
            <p class="hotvideo-text">视频达人</p>
            <div class="hotvideo-avatar">
                <ul>
                    <li v-for="item in 5">
                        <router-link>
                            <img src="../static/image/5.1_list.jpg" alt="">
                            <p class="hotvideo-txt" :class="{ 'ellipsis': itemText.length > 3 }">{{ itemText }}</p>
                        </router-link>
                    </li>
                </ul>
            </div>
            <div class="hotvideo-list-pic">
                <ul>
                    <li>
                        <div class="hotvideo-pic">
                            <img src="../static/image/6.1_list.jpg" alt="">
                        </div>
                        <p class="hotvideo-p1">文本文本文本文本</p>
                        <div class="hotvideo-down">
                            <p class="hotvideo-p2">鱼小厨</p>
                            <p class="hotvideo-span">
                                <span>320938</span>
                                <span>5579</span>
                            </p>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div class=" hotvideo-list-pic2">
            <div class="hotvideo-list-pic">
                <ul>
                    <li>
                        <div class="hotvideo-pic">
                            <img src="../static/image/6.1_list.jpg" alt="">
                        </div>
                        <p class="hotvideo-p1">文本文本文本文本</p>
                        <div class="hotvideo-down">
                            <p class="hotvideo-p2">鱼小厨</p>
                            <p class="hotvideo-span">
                                <span>320938</span>
                                <span>5579</span>
                            </p>
                        </div>
                    </li>
                </ul>
            </div>
        </div>

    </div>
</template>
<script>


</script>
<style lang="less">
@import url('../assets/main.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

}

.hotvideo {
    width: 100vw;
    margin: 0 auto;
    overflow: hidden;
    padding-bottom: 60px;

    .hotvideo-heaer {
        width: 100%;
        position: fixed;
        height: 60px;
        line-height: 60px;
        // background-color: #FFA940;
        align-items: center;
        border: 1px solid #ccc;
        display: flex;
        padding: 0 15px;
        z-index: 1000;

        .i-arrow {
            display: inline-block;
            width: 24px;
            height: 32px;
            background-image: url("../assets/image/arrow.png");
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            margin-right: 10px;
        }

        h3 {
            font-size: 30px;
            font-family: aaa;
        }
    }

    .hotvideo-list {
        margin-top: 60px;
        // padding: 0 20px;

        ul {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: #ccc 1px solid;
            padding: 0 15px;
        }

        li {
            flex: 1;
            list-style: none;
            text-align: center;
            // padding: 15px 0;
            width: 100%;
            height: 60px;
            line-height: 60px;
            font-size: 18px;
            font-family: aaa;
            font-weight: bold;
            border-bottom: 2px solid transparent;

            &:hover {
                border-bottom-color: #FFA940; // 悬停时显示下划线
            }

            router-link {
                color: inherit;
                text-decoration: none;
            }
        }
    }

    .hotvideo-text {
        padding: 20px 20px;
        font-size: 24px;
        font-family: aaa;
        font-weight: bold;
    }

    .hotvideo-avatar {
        padding: 0 20px;

        ul {
            display: flex;
            justify-content: space-between;
            align-items: center;
            overflow-x: auto;
            // 隐藏溢出内容
            overflow-y: hidden;
            // 禁止换行
            flex-wrap: nowrap;

            &::-webkit-scrollbar {
                display: none;
            }

            li {
                width: 65px;
                flex-shrink: 0;
                text-align: center;
                margin-right: 10px;

                img {
                    // width: 100%;
                    width: 60px;
                    height: 60px;
                    object-fit: cover;
                    border-radius: 50%;
                }

                .hotvideo-txt {
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    max-width: 100%;
                    font-size: 16px;
                    font-family: aaa;
                    font-weight: bold;
                    margin-top: 5px;

                }
            }
        }
    }

    .hotvideo-list-pic {
        padding: 15px 20px;

        ul {
            width: 100%;

            li {
                width: 100%;
                margin-bottom: 10px;

                .hotvideo-pic {
                    width: 100%;
                    height: 200px;
                    overflow: hidden;
                    border-radius: 10px;

                    img {
                        width: 100%;
                    }
                }

                .hotvideo-p1 {
                    font-size: 20px;
                    font-family: aaa;
                    font-weight: bold;
                    margin-top: 10px;
                }

                .hotvideo-down {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    margin-top: 10px;

                    .hotvideo-p2 {
                        display: inline-block;
                        font-size: 16px;
                        font-family: aaa;
                        font-weight: bold;
                        margin-right: 100px;
                        width: 100%;
                        color: #B1C0D1;

                    }

                    .hotvideo-span {
                        display: flex;
                        justify-content: space-between;
                        align-items: center;
                        width: 100%;

                        span {
                            display: inline-block;
                            font-size: 16px;
                            font-family: aaa;
                            font-weight: bold;
                            color: #B1C0D1;

                        }
                    }
                }
            }
        }
    }
}
</style>